package com.qixiaobao.system.service;

import com.qixiaobao.system.domain.FileInfo;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;

/**
 * @Description 文件信息  业务层
 * @Author yangxm
 * @Date 2025/6/17 15:35
 */
public interface IFileInfoService {


    /**
     * @Description 根据拥有者查询文件信息
     * @param owner
     * @return java.util.List<com.qixiaobao.nondirect.invoice.domain.domain.FileInfo>
     */
    List<FileInfo> selectFileInfoListByOwner(String owner);

    /**
     * @Description 根据owner查询文件url
     * @Author yangxm
     * @Date 2025/6/18 13:25
     * @param owner
     * @return java.lang.String
     */
    String selectUrlByOwner(String owner);

    /**
     * @Description 保存文件信息
     * @Author yangxm
     * @Date 2025/6/18 13:25
     * @param multipartFile
     * @param owner
     * @param flag
     * @return com.qixiaobao.nondirect.invoice.domain.domain.FileInfo
     */
    FileInfo saveByOss(MultipartFile multipartFile, String owner, boolean flag);

    /**
     * @Description 保存文件信息
     * @Author yangxm
     * @Date 2025/6/18 13:25
     * @param file
     * @return java.lang.String
     */
    String save(MultipartFile file) throws IOException;
}
